package com.dieusoft.box.trade.service.impl;

import com.dieusoft.box.trade.entity.CostInfo;
import com.dieusoft.box.trade.mapper.CostInfoMapper;
import com.dieusoft.box.trade.service.ICostInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 费用明细信息表
 * @Author: jeecg-boot
 * @Date: 2020-10-22
 * @Version: V1.0
 */
@Service
public class CostInfoServiceImpl extends ServiceImpl<CostInfoMapper, CostInfo> implements ICostInfoService {

    @Autowired
    private CostInfoMapper costInfoMapper;

    @Override
    public List<CostInfo> selectByMainId(String mainId, String type) {
        return costInfoMapper.selectByMainId(mainId, type);
    }

    @Override
    public List<CostInfo> selectByBillNumber(String billNumber) {
        return costInfoMapper.selectByBillNumber(billNumber);
    }

    @Override
    public List<CostInfo> getCostInfosByIds(List<String> list) {
        return costInfoMapper.getCostInfosByIds(list);
    }

    @Override
    public boolean updateByBillNumber(String billNumber, String updateUser, String status, String invoiceNumber) {
        return costInfoMapper.updateByBillNumber(billNumber, updateUser, status, invoiceNumber);
    }

    @Override
    public boolean resetByBillNumber(String billNumber, String updateUser, String status, String invoiceNumber) {
        return costInfoMapper.resetByBillNumber(billNumber, updateUser, status, invoiceNumber);
    }

    @Override
    public boolean deleteByMainIdAndType(List<String> ids) {
        return costInfoMapper.deleteByMainIdAndType(ids);
    }
}
